package com.demo.Object;

import javax.sound.midi.Soundbank;

/**
 * @author gy
 * @date 2022/3/7
 */
public class equalsTest {
    public static void main(String[] args) {
        int i = 10;
        double d =10.0;
        if (i == d){
            System.out.println("=======");

        }
    }
}

class Test{
    public static void main(String[] args) {
        String name = "hello,,,,world";
//        System.out.println(name.substring(5, 9));
        String name1 = "   ==hello,  ,,,world==  ";
        // trim 去除前后空格，注意：中间的空串不会去除
        System.out.println(name1.trim());
        System.out.println(name1.replace(" ", ""));

        String str3 = "   ==hello,  ,,,world==  ";
        char[] chars = str3.toCharArray();
        for (char aChar : chars) {
            System.out.println(aChar);
        }

        for (int i = 0; i < chars.length; i++) {
            System.out.println("第"+ (i+1) + "个字符： " + chars[i]);
        }

    }
}
